﻿from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
# Uncomment this for admin:
from django.contrib import admin
# Uncomment to load INSTALLED_APPS admin.py module for default AdminSite instance.
admin.autodiscover()
    
urlpatterns = patterns('',
    # Example:
    # (r'^helloniu/', include('helloniu.foo.urls')),
    (r'^$', 'helloniu.helloniuniu.index'),
    (r'^helloniu', 'helloniu.helloniuniu.index'),
    (r'^add/$', 'helloniu.niuadd.index'),
    (r'^list/$', 'helloniu.niulist.index'),
    (r'^csv/(?P<filename>\w+)/$', 'helloniu.csv_test.output'),
    (r'^login/$', 'helloniu.login.login'),    
    (r'^register/$', 'helloniu.login.register'),
    (r'^logout/$', 'helloniu.login.logout'),    
    (r'^hostmeeting/$', 'helloniu.login.hostmeeting'),    
    (r'^joinmeeting/$', 'helloniu.login.joinmeeting'),    
    (r'^wiki/$', 'helloniu.wiki.views.index'),
    (r'^wiki/(?P<pagename>\w+)/$', 'helloniu.wiki.views.index'),
    (r'^wiki/(?P<pagename>\w+)/edit/$', 'helloniu.wiki.views.edit'),
    (r'^wiki/(?P<pagename>\w+)/save/$', 'helloniu.wiki.views.save'),
    
    
    (r'^getfile/(.*)$', 'django.views.static.serve', {'document_root' : 'templates'}),
    
    (r'^js/(.*)$', 'django.views.static.serve', {'document_root' : 'templates/js'}),
    (r'^css/(.*)$', 'django.views.static.serve', {'document_root' : 'templates/css'}),
    (r'^img/(.*)$', 'django.views.static.serve', {'document_root' : 'templates/img'}),
    (r'^swf/(.*)$', 'django.views.static.serve', {'document_root' : 'templates/swf'}),
    #(r'^getfile/(?P<path>.*)$', 'django.views.static.serve', {'document_root' : 'templates'}),
    
    # static pages
    #http://huacn.blogbus.com/logs/31251131.html
    #(r'^static/(.*)','django.views.static.serve', {'document_root': './static/'}),
       

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    #(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/', include(admin.site.urls)),
    
    # Uncomment this for admin:    
    #(r'^admin/', include('django.contrib.admin.urls'))
    (r'^admin/(.*)', admin.site.root),
)
